<?php

namespace app\admin\model;

use think\Model;

class Thirdwork extends Model
{
    // 表名
    protected $name = 'thirdwork';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = false;


    public static function getPlatformList()
    {
        $data = [
//            'dingtalk'      => '钉钉',
            'wechatwork'    => '企业微信',
//            'feishu'        => '飞书',
        ];
        return $data;
    }

    public function user()
    {
        return $this->belongsTo('User', 'user_id', 'id')->setEagerlyType(0);
    }
}
